FOSS Documentation - Script commands


Index

@+ [target] [1st#] [2nd#]

[index]
Description:
Add together two numbers and store result in given variable.
Parameters:
ParameterDescription
targetIdentifier of variable to store result in
1st#First of two numbers to add
2nd#Second of two numbers to add
Example:
CodelineDescriptionOutput
@+ add_res 12 30 Add 12 and 30 and store the result in a variable named add_res
12+30=%add_res%12+30=42
See also:
@-, @/, @*

@- [target] [1st#] [2nd#]

[index]
Description:
Subtract one number from another and store result in given variable.
Parameters:
ParameterDescription
targetIdentifier of variable to store result in
1st#First of two numbers to add
2nd#Second of two numbers to add
Example:
CodelineDescriptionOutput
@- sub_res 30 10Subtract 10 from 30 and store the result in sub_res
30-10=%sub_res%20
See also:
@+, @/, @*

@/ [target] [1st#] [2nd#]

[index]
Description:
Divide one number on another and store result in given variable.
Parameters:
ParameterDescription
targetIdentifier of variable to store result in
1st#Number to divide
2nd#Number to divide on
Example:
CodelineDescriptionOutput
@/ div_res 30 2Divide 30 on 2 and store the result in a variable named div_res
30/2=%div_res%30/2=15
See also:
@+, @-, @*

@* [target] [1st#] [2nd#]

[index]
Description:
Multiply two numbers and store result in given variable.
Parameters:
ParameterDescription
targetIdentifier of variable to store result in
1st#1st number to multiply
2nd#2nd number to multiply
Example:
CodelineDescriptionOutput
@* mlt_res 2 2Multiply 2 and 2 and store the result in a variable named mlt_res
2*2=%mlt_res%2*2=4
See also:
@+, @-, @/

@beep [freq] [len]

[index]
Description:
Play a sound of given frequency and duration on the internal speaker of the local PC. No sound is sent remote.
Parameters:
ParameterDescription
freqFrequency of sound in Hz
lenLength of sound in 1/1000th second
Example:
CodelineDescriptionOutput
@beep 5500 1000Play a 5,5kHz sound for 1 second
See also:

@call [filename]

[index]
Description:
Call another script of given name, this script will continue when called script is done. Called script should reside in the SCRIPTS subdirectory.
Parameters:
ParameterDescription
filenameName of script to call
Example:
CodelineDescriptionOutput
@call TESTCall script SCRIPTS\TEST(from script TEST only)
See also:
@run, @rundos

@Case [var]

[index]
Description:
Convert content of given variable to nice-case (First letter of all words to up-case, the rest is low-case).
Parameters:
ParameterDescription
varIdentifier of variable to convert
Example:
CodelineDescriptionOutput
@set one_var this is a testStore value in variable one_var
@Case one_varConvert content of one_var to nice-case
%one_var%This Is A Test
See also:
@CASE

@CASE [var]

[index]
Description:
Convert content of given variable to upper-case.
Parameters:
ParameterDescription
varIdentifier of variable to convert
Example:
CodelineDescriptionOutput
@set one_var This Is A TestStore value in variable one_var
@CASE one_varConvert content of one_var to upper-case
%one_var%THIS IS A TEST
See also:
@Case

@command [command] {[command]...}

[index]
Description:
Run normal FOSS user prompt commands.
Parameters:
ParameterDescription
commandFOSS command to run
Example:
CodelineDescriptionOutput
@command ?Display current menu(current menu)
See also:

@debug {vardump}

[index]
Description:
With no parameters passed, this command turns on debug mode for the current script which means that each line will be written to the MAIN\USAGELOG.SYS file before processed.
Parameters:
ParameterDescription
vardumpCause a screen dump of all allocated variables
Example:
CodelineDescriptionOutput
@debugInit debug mode
@debug vardumpDisplay current variables(dump of variables)
See also:

@delay [secs] {[char]}

[index]
Description:
Stop the script for a given number of seconds, with option to display a character each second.
Parameters:
ParameterDescription
secsNumber of seconds to delay
charOptional character to print each second
Example:
CodelineDescriptionOutput
@delay 5 .Delay for 5 seconds, send . each second.....
See also:

@delfile [filename] {[filename] ...}

[index]
Description:
Delete one or more files.
Parameters:
ParameterDescription
filenameName or path of file to delete
Example:
CodelineDescriptionOutput
@delfile test.tstDelete file test.tst
See also:

@exit {[command] ...}

[index]
Description:
Exit script with option to add commands to systems command que. Commands given as a parameter to this command will be placed in the front of the command que.
Parameters:
ParameterDescription
commandCommand to be added to command que
Example:
CodelineDescriptionOutput
@exitEnd script
@exit ?End script and show current menu(current menu)
See also:

@file [filename]

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@getfirst [target] [source]

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@goto [label]

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@if [str1] [str2] [label]
@if [1st#] <|<=|=|=>|> [2nd#] [label]

[index]
Description:
Compare two strings or two number with eachother.
Parameters:
Parameter Description
str1
str2
Strings to be compared, these strings must be surrounded by " if they include spaces.
1st#
2nd#
Numbers to be compared
label Label to jump to if argument given is true
Example:
CodelineDescriptionOutput
@if 1 = 1 OkCompare 1 and 1, jump to Ok if equal.
@if "Terje Flaaronning" "%usr_name%" OkCompare Terje Flaaronning aginst system variable usr_name and jump to Ok if equal.
See also:

@ifcommand [str] [command] [label]

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@iffile [filename] [label]

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@input

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@log {$}[text]

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@math [target] [expr]

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@mod [target] [1st#] [2nd#]

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@readln [line#] [target] {[line#] [target] ...}

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@receive

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@return [retvalue] [commands]

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@run [program] {params}

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@rundos [program] {params}

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@select "[keys]" [prompt]

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@send [filename] {protocol}

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@set [ident] [value]

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@show [filename]

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@splitpath [path] [var4dir] [var4name]

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@write [text]

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

@writeln [text]

[index]
Description:
.
Parameters:
ParameterDescription
Example:
CodelineDescriptionOutput
See also:

These pages are Copyright © 1995-96 by Terje Flaarønning
This page is last updated at 24th March 1996